﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BLL;
using Model;
using System.IO;

using System.Data.SqlClient;
public partial class UserInformation : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            if (Session["admin"] == null)
            {

                Response.Redirect("Default.aspx");

            }
        }
        if (Session["admin"] == null)
        {

            Response.Redirect("Default.aspx");

        }
        string name = Session["admin"].ToString ();
        lab_name.Text = "欢迎您:" + name;
         UserInfoManager ui=new UserInfoManager ();
        DataTable dt=new DataTable ();
        dt = ui.find(name);
        string name1=dt.Rows [0][5].ToString();
        if (name1 == string.Empty)
        {
            Labname1.Text = "保密";
        }
        else
        {
            Labname1.Text = name1;
        }
        Labemail.Text = dt.Rows[0][3].ToString();
        string g = dt.Rows[0][2].ToString();
        if (g == "0")
        {
            Labgender.Text  = "保密";
        }
        else if (g == "1")
        {
            Labgender.Text = "男";
        }
        else
        {
            Labgender.Text = "女";
        }
        string qq = dt.Rows[0][4].ToString();
        if (qq == string.Empty)
        {
            Labqq.Text = "保密";
        }
        else
        {
            Labqq.Text = qq;
        }
        string remark = dt.Rows[0][10].ToString();
        if (remark == string.Empty)
        {
            LabRemark.Text = "暂无";
        }
        else
        {
            LabRemark.Text = remark;
        }
    }
}
